import QtQuick 1.0
import com.meego 1.0
import "CommomUtil.js" as Util
import "const.js" as Const


/**
  * 更多页面
  * shenjia.caosj 2011-08-14
  */

Page {
    id: more_page

    tools: commonTools

    orientationLock : PageOrientation.LockPortrait

    TitleBar {
        id: more_title
        anchors.top: more_page.top; anchors.left: more_page.left
        width: parent.width; height: 71
        titleName: "更多"
    }

    //background
    BorderImage {
        id: more_body_back
        source: "../images/more/back.png"
        width: more_page.width; height: more_page.height - more_title.height
        anchors.top: more_title.bottom; anchors.left: more_page.left
    }

    //设置
    Rectangle {
        id:settings_rect
        anchors.top: more_body_back.top
        anchors.topMargin:20
        width: 451
        height: 65
        anchors.horizontalCenter: parent.horizontalCenter
        Image {
            source: "../images/more/top.png"
            anchors.fill: parent
        }
        Image {
            id:settings_img
            source: "../images/more/ico1.png"
            anchors.left:parent.left
            anchors.verticalCenter: parent.verticalCenter
            anchors.leftMargin: 20
        }
        NormalText {
            text: "设置"
            anchors.left:settings_img.right
            anchors.leftMargin: 25
            anchors.verticalCenter: parent.verticalCenter
            color: Const.Color.darkBlue
            font.pointSize: Const.FontSize.normal
            font.bold: true
        }
        MouseArea{
            id: settingArea
            anchors.fill: parent
            onClicked:Util.openFile("more/SettingsPage.qml");
        }

        states: [
            State {
                name: 'pressed'; when: settingArea.pressed
                PropertyChanges { target: settingPressed; focus: true; opacity: 0.5}
            }
        ]

        Rectangle{
            id: settingPressed
            anchors.fill: parent
            color: "#000"
            opacity: 0
        }

    }

    //账号管理
    Rectangle {
        id:account_rect
        anchors.left: settings_rect.left
        anchors.top: settings_rect.bottom
        width: settings_rect.width
        height: settings_rect.height
        Image {
            source: "../images/more/mid.png"
            anchors.fill: parent
        }
        Image {
            id:account_img
            source: "../images/more/ico2.png"
            anchors.left:parent.left
            anchors.verticalCenter: parent.verticalCenter
            anchors.leftMargin: 20
        }
        NormalText {
            text: "账号管理"
            anchors.left:account_img.right
            anchors.leftMargin: 25
            anchors.verticalCenter: parent.verticalCenter
            color: Const.Color.darkBlue
            font.pointSize: Const.FontSize.normal
            font.bold: true
        }
        MouseArea{
            id: accountArea
            anchors.fill: parent
            onClicked:Util.openFile("more/AccountsPage.qml");
        }
        states: [
            State {
                name: 'pressed'; when: accountArea.pressed
                PropertyChanges { target: accountPressed; focus: true; opacity: 0.5}
            }
        ]

        Rectangle{
            id: accountPressed
            anchors.fill: parent
            color: "#000"
            opacity: 0
        }
    }

    //意见反馈
    Rectangle {
        id:feedback_rect
        anchors.left: account_rect.left
        anchors.top: account_rect.bottom
        width: account_rect.width
        height: account_rect.height
        Image {
            source: "../images/more/mid.png"
            anchors.fill: parent
        }
        Image {
            id:feedback_img
            source: "../images/more/ico3.png"
            anchors.left:parent.left
            anchors.verticalCenter: parent.verticalCenter
            anchors.leftMargin: 20
        }
        NormalText {
            text: "意见反馈"
            anchors.left:feedback_img.right
            anchors.leftMargin: 25
            anchors.verticalCenter: parent.verticalCenter
            color: Const.Color.darkBlue
            font.pointSize: Const.FontSize.normal
            font.bold: true
        }
        MouseArea{
            id: feedbackArea
            anchors.fill: parent
            onClicked:Util.switchFile("more/FeedbackPage.qml");
        }

        states: [
            State {
                name: 'pressed'; when: feedbackArea.pressed
                PropertyChanges { target: feedbackPressed; focus: true; opacity: 0.5}
            }
        ]

        Rectangle{
            id: feedbackPressed
            anchors.fill: parent
            color: "#000"
            opacity: 0
        }
    }

    //关于
    Rectangle {
        id:about_rect
        anchors.left: feedback_rect.left
        anchors.top: feedback_rect.bottom
        width: feedback_rect.width
        height: feedback_rect.height
        Image {
            source: "../images/more/down.png"
            anchors.fill: parent
       }
        Image {
            id:about_img
            source: "../images/more/ico4.png"
            anchors.left:parent.left
            anchors.verticalCenter: parent.verticalCenter
            anchors.leftMargin: 20
        }
        NormalText {
            text: "关于"
            anchors.left:about_img.right
            anchors.leftMargin: 25
            anchors.verticalCenter: parent.verticalCenter
            color: Const.Color.darkBlue
            font.pointSize: Const.FontSize.normal
            font.bold: true
        }
        MouseArea{
            id: abortArea
            anchors.fill: parent
            onClicked:Util.openFile("more/AboutPage.qml");
        }

        states: [
            State {
                name: 'pressed'; when: abortArea.pressed
                PropertyChanges { target: abortPressed; focus: true; opacity: 0.5}
            }
        ]

        Rectangle{
            id: abortPressed
            anchors.fill: parent
            color: "#000"
            opacity: 0
        }
    }


}
